import request from '@/utils/request'

export function findClient(params) {
  return request({
    url: '/auth/client/find',
    method: 'get',
    params
  })
}

export function getClient(clientId) {
  return request({
    url: `/auth/client/getById/${clientId}`,
    method: 'get'
  })
}

export function updateClient(data) {
  return request({
    url: `/auth/client/update`,
    method: 'post',
    data
  })
}


export function addClient(data) {
  return request({
    url: '/auth/client/save',
    method: 'post',
    data
  })
}

export function resetClientSecret(clientId) {
  return request({
    url: `/auth/client/resetSecret/${clientId}`,
    method: 'get',
  })
}


export function deleteClient(ids) {
  return request({
    url: '/auth/client/delete',
    method: 'post',
    data: ids
  })
}

